module.exports = function(mod,name){	
	mod.service(name,['$location','$http', function($location, $http) { 
	 return{ 
	 	//前一页
	 	goPre : function(page){
			$location.path(page);
	  		},
	 	//ajaxAngularCall
	 	angularCallAjax : function(method, reqUrl, params,success) {
			$http({
				method: method,
				url: reqUrl,
				params: params
			}).
			success(function(data, status, headers, config) {
				success(data , status);
			}).error(function(data, status, headers, config) {
				console.log("FAIL");
			});
		},angularCallAjaxGetPost : function(method, reqUrl, params, data,success) {
			$http({
				method: method,
				url: reqUrl,
				params: params,
				data: data
			}).
			success(function(data, status, headers, config) {
				success(data , status);
			}).error(function(data, status, headers, config) {
				console.log("FAIL");
			});
		},
	 	//页面跳转
	 	redirectPage : function(page){
	 		$location.path(page);
	 	}
	}
	}]);
}
